For this week, the fabguys set a CNC machine in the lab to draw remotely in sand. The network was built using a Raspberry-Pi, and through an interface we could connect to the machine. To replicate the network, click here. The system has many different parts and if we "break down" the process, we can see that in order for a user to connect to the machine, she/he first has to connect to the IAAC routers which has static IPs - these addresses are manually configured for a device instead of assigned by a company (these are dynamic because they change constantly). The static IP, is useful because other devices (in this our computers) always know how to contact. To read more, click here. From the IP, we access the Raspberry-Pi, through a "proxy server" and then use CNCJS to access the machine who is using and arduino and using Marlin code (GCODE for CNC machines).
To begin, I had to make a drawing and save it in GCODE. The fabguys explained a bit the basics. To read more, here. To make it I used Inkscape and then uploaded the file to fabmodules. Here is where we encountered the first problem, fabmodules uses inches as default so when uploading my drawing to the web and sending it to the Kraken, it drew it super super small (It wasn't even visible to the eyes / the webcam). I changed the GCODE using atom and replacing some of the parameters the fabguys told me I needed to. But in the end, time was upon me so I stopped trying to find the best way using fabmodules. After a while, Edu sent us a script he made using Grasshopper (linked in files) so everything became easier at this point, or at least that is what I thought.
The next day, I accesed the machine and found two things, the sand was pretty messy with all the drawings my classmates made and that someone broke the "paddle" used to clean the area. So, I tried running the GCODE (first I had to change de Z to find the right height position). The first time the paddle didn't go down completely, so I sent it home and realized the paddle was down perpendicularly! The machine didn't finish the whole script, so the machine never got the "move servo 90°". When reopening the GCODE, I searched for something that could be useful and using the Marling webpage mentioned above, I found the right command - "M280 P1 S0". Then I could send it to home properly "G28 X Y" and move Z to the beginning position "G0 Z100" and finally "G90" to put the machine in absolute positioning. From here, I tried a few times to get the right Z and when finally got it, I ran the code. Unfortunately after this, the "paddle" attached to the machine fell off... So from the next day we had to run the cleaning code without using the paddle. It still worked fine, but the outcome wasn't as clean.
Anyway, it worked. And from here I sticked to the Grasshopper script. First I did some lines.
After this, some plants and a hand.
Then, someone in my house got too excited about it... So I let him draw something.